import request from '@/utils/request'

// 查询附件列表
export function listFj(query) {
  return request({
    url: '/gd/fj/list',
    method: 'get',
    params: query
  })
}

// 查询附件列表
export function allListFj(fjid) {
  return request({
    url: '/gd/fj/all/list/' + fjid,
    method: 'get'
  })
}

// 查询附件详细
export function getFj(fjid) {
  return request({
    url: '/gd/fj/' + fjid,
    method: 'get'
  })
}

// 新增附件
export function addFj(data) {
  return request({
    url: '/gd/fj',
    method: 'post',
    data: data
  })
}

// 修改附件
export function updateFj(data) {
  return request({
    url: '/gd/fj',
    method: 'put',
    data: data
  })
}

// 删除附件
export function delFj(fjid) {
  return request({
    url: '/gd/fj/' + fjid,
    method: 'delete'
  })
}

// 获取附件流
export function getFjById(fjid, type) {
  return request({
    url: '/gd/fj/getFj/' + fjid,
    method: 'get',
    responseType: type
  })
}
